3.17.38 \(\int \frac {(a+b x)^2}{(c+d x) \sqrt {e+f x}} \, dx\)

Optimal. Leaf size=112 \[ -\frac {2 (b c-a d)^2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{5/2} \sqrt {d e-c f}}-\frac {2 b \sqrt {e+f x} (-2 a d f+b c f+b d e)}{d^2 f^2}+\frac {2 b^2 (e+f x)^{3/2}}{3 d f^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {88, 63, 208} \begin {gather*} -\frac {2 b \sqrt {e+f x} (-2 a d f+b c f+b d e)}{d^2 f^2}-\frac {2 (b c-a d)^2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{5/2} \sqrt {d e-c f}}+\frac {2 b^2 (e+f x)^{3/2}}{3 d f^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x)^2/((c + d*x)*Sqrt[e + f*x]),x]

[Out]

(-2*b*(b*d*e + b*c*f - 2*a*d*f)*Sqrt[e + f*x])/(d^2*f^2) + (2*b^2*(e + f*x)^(3/2))/(3*d*f^2) - (2*(b*c - a*d)^
2*ArcTanh[(Sqrt[d]*Sqrt[e + f*x])/Sqrt[d*e - c*f]])/(d^(5/2)*Sqrt[d*e - c*f])

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin {align*} \int \frac {(a+b x)^2}{(c+d x) \sqrt {e+f x}} \, dx &=\int \left (-\frac {b (b d e+b c f-2 a d f)}{d^2 f \sqrt {e+f x}}+\frac {(-b c+a d)^2}{d^2 (c+d x) \sqrt {e+f x}}+\frac {b^2 \sqrt {e+f x}}{d f}\right ) \, dx\\ &=-\frac {2 b (b d e+b c f-2 a d f) \sqrt {e+f x}}{d^2 f^2}+\frac {2 b^2 (e+f x)^{3/2}}{3 d f^2}+\frac {(b c-a d)^2 \int \frac {1}{(c+d x) \sqrt {e+f x}} \, dx}{d^2}\\ &=-\frac {2 b (b d e+b c f-2 a d f) \sqrt {e+f x}}{d^2 f^2}+\frac {2 b^2 (e+f x)^{3/2}}{3 d f^2}+\frac {\left (2 (b c-a d)^2\right ) \operatorname {Subst}\left (\int \frac {1}{c-\frac {d e}{f}+\frac {d x^2}{f}} \, dx,x,\sqrt {e+f x}\right )}{d^2 f}\\ &=-\frac {2 b (b d e+b c f-2 a d f) \sqrt {e+f x}}{d^2 f^2}+\frac {2 b^2 (e+f x)^{3/2}}{3 d f^2}-\frac {2 (b c-a d)^2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{5/2} \sqrt {d e-c f}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.14, size = 112, normalized size = 1.00 \begin {gather*} -\frac {2 (b c-a d)^2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{5/2} \sqrt {d e-c f}}-\frac {2 b \sqrt {e+f x} (-2 a d f+b c f+b d e)}{d^2 f^2}+\frac {2 b^2 (e+f x)^{3/2}}{3 d f^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)^2/((c + d*x)*Sqrt[e + f*x]),x]

[Out]

(-2*b*(b*d*e + b*c*f - 2*a*d*f)*Sqrt[e + f*x])/(d^2*f^2) + (2*b^2*(e + f*x)^(3/2))/(3*d*f^2) - (2*(b*c - a*d)^
2*ArcTanh[(Sqrt[d]*Sqrt[e + f*x])/Sqrt[d*e - c*f]])/(d^(5/2)*Sqrt[d*e - c*f])

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.17, size = 112, normalized size = 1.00 \begin {gather*} \frac {2 b \sqrt {e+f x} (6 a d f-3 b c f+b d (e+f x)-3 b d e)}{3 d^2 f^2}-\frac {2 (a d-b c)^2 \tan ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x} \sqrt {c f-d e}}{d e-c f}\right )}{d^{5/2} \sqrt {c f-d e}} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(a + b*x)^2/((c + d*x)*Sqrt[e + f*x]),x]

[Out]

(2*b*Sqrt[e + f*x]*(-3*b*d*e - 3*b*c*f + 6*a*d*f + b*d*(e + f*x)))/(3*d^2*f^2) - (2*(-(b*c) + a*d)^2*ArcTan[(S
qrt[d]*Sqrt[-(d*e) + c*f]*Sqrt[e + f*x])/(d*e - c*f)])/(d^(5/2)*Sqrt[-(d*e) + c*f])

________________________________________________________________________________________

fricas [A]  time = 1.72, size = 375, normalized size = 3.35 \begin {gather*} \left [\frac {3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {d^{2} e - c d f} f^{2} \log \left (\frac {d f x + 2 \, d e - c f - 2 \, \sqrt {d^{2} e - c d f} \sqrt {f x + e}}{d x + c}\right ) - 2 \, {\left (2 \, b^{2} d^{3} e^{2} + {\left (b^{2} c d^{2} - 6 \, a b d^{3}\right )} e f - 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2}\right )} f^{2} - {\left (b^{2} d^{3} e f - b^{2} c d^{2} f^{2}\right )} x\right )} \sqrt {f x + e}}{3 \, {\left (d^{4} e f^{2} - c d^{3} f^{3}\right )}}, \frac {2 \, {\left (3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-d^{2} e + c d f} f^{2} \arctan \left (\frac {\sqrt {-d^{2} e + c d f} \sqrt {f x + e}}{d f x + d e}\right ) - {\left (2 \, b^{2} d^{3} e^{2} + {\left (b^{2} c d^{2} - 6 \, a b d^{3}\right )} e f - 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2}\right )} f^{2} - {\left (b^{2} d^{3} e f - b^{2} c d^{2} f^{2}\right )} x\right )} \sqrt {f x + e}\right )}}{3 \, {\left (d^{4} e f^{2} - c d^{3} f^{3}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2/(d*x+c)/(f*x+e)^(1/2),x, algorithm="fricas")

[Out]

[1/3*(3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(d^2*e - c*d*f)*f^2*log((d*f*x + 2*d*e - c*f - 2*sqrt(d^2*e - c*d*
f)*sqrt(f*x + e))/(d*x + c)) - 2*(2*b^2*d^3*e^2 + (b^2*c*d^2 - 6*a*b*d^3)*e*f - 3*(b^2*c^2*d - 2*a*b*c*d^2)*f^
2 - (b^2*d^3*e*f - b^2*c*d^2*f^2)*x)*sqrt(f*x + e))/(d^4*e*f^2 - c*d^3*f^3), 2/3*(3*(b^2*c^2 - 2*a*b*c*d + a^2
*d^2)*sqrt(-d^2*e + c*d*f)*f^2*arctan(sqrt(-d^2*e + c*d*f)*sqrt(f*x + e)/(d*f*x + d*e)) - (2*b^2*d^3*e^2 + (b^
2*c*d^2 - 6*a*b*d^3)*e*f - 3*(b^2*c^2*d - 2*a*b*c*d^2)*f^2 - (b^2*d^3*e*f - b^2*c*d^2*f^2)*x)*sqrt(f*x + e))/(
d^4*e*f^2 - c*d^3*f^3)]

________________________________________________________________________________________

giac [A]  time = 1.14, size = 150, normalized size = 1.34 \begin {gather*} \frac {2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {\sqrt {f x + e} d}{\sqrt {c d f - d^{2} e}}\right )}{\sqrt {c d f - d^{2} e} d^{2}} + \frac {2 \, {\left ({\left (f x + e\right )}^{\frac {3}{2}} b^{2} d^{2} f^{4} - 3 \, \sqrt {f x + e} b^{2} c d f^{5} + 6 \, \sqrt {f x + e} a b d^{2} f^{5} - 3 \, \sqrt {f x + e} b^{2} d^{2} f^{4} e\right )}}{3 \, d^{3} f^{6}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2/(d*x+c)/(f*x+e)^(1/2),x, algorithm="giac")

[Out]

2*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*arctan(sqrt(f*x + e)*d/sqrt(c*d*f - d^2*e))/(sqrt(c*d*f - d^2*e)*d^2) + 2/3*
((f*x + e)^(3/2)*b^2*d^2*f^4 - 3*sqrt(f*x + e)*b^2*c*d*f^5 + 6*sqrt(f*x + e)*a*b*d^2*f^5 - 3*sqrt(f*x + e)*b^2
*d^2*f^4*e)/(d^3*f^6)

________________________________________________________________________________________

maple [B]  time = 0.01, size = 201, normalized size = 1.79 \begin {gather*} \frac {2 a^{2} \arctan \left (\frac {\sqrt {f x +e}\, d}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}}-\frac {4 a b c \arctan \left (\frac {\sqrt {f x +e}\, d}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}\, d}+\frac {2 b^{2} c^{2} \arctan \left (\frac {\sqrt {f x +e}\, d}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}\, d^{2}}+\frac {4 \sqrt {f x +e}\, a b}{d f}-\frac {2 \sqrt {f x +e}\, b^{2} c}{d^{2} f}-\frac {2 \sqrt {f x +e}\, b^{2} e}{d \,f^{2}}+\frac {2 \left (f x +e \right )^{\frac {3}{2}} b^{2}}{3 d \,f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^2/(d*x+c)/(f*x+e)^(1/2),x)

[Out]

2/3*b^2*(f*x+e)^(3/2)/d/f^2+4/f*b/d*a*(f*x+e)^(1/2)-2/f*b^2/d^2*c*(f*x+e)^(1/2)-2/f^2*b^2/d*e*(f*x+e)^(1/2)+2/
((c*f-d*e)*d)^(1/2)*arctan((f*x+e)^(1/2)/((c*f-d*e)*d)^(1/2)*d)*a^2-4/d/((c*f-d*e)*d)^(1/2)*arctan((f*x+e)^(1/
2)/((c*f-d*e)*d)^(1/2)*d)*a*b*c+2/d^2/((c*f-d*e)*d)^(1/2)*arctan((f*x+e)^(1/2)/((c*f-d*e)*d)^(1/2)*d)*b^2*c^2

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2/(d*x+c)/(f*x+e)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(c*f-d*e>0)', see `assume?` for
 more details)Is c*f-d*e positive or negative?

________________________________________________________________________________________

mupad [B]  time = 1.25, size = 152, normalized size = 1.36 \begin {gather*} \frac {2\,b^2\,{\left (e+f\,x\right )}^{3/2}}{3\,d\,f^2}-\sqrt {e+f\,x}\,\left (\frac {4\,b^2\,e-4\,a\,b\,f}{d\,f^2}+\frac {2\,b^2\,\left (c\,f^3-d\,e\,f^2\right )}{d^2\,f^4}\right )+\frac {2\,\mathrm {atan}\left (\frac {\sqrt {d}\,\sqrt {e+f\,x}\,{\left (a\,d-b\,c\right )}^2}{\sqrt {c\,f-d\,e}\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}\right )\,{\left (a\,d-b\,c\right )}^2}{d^{5/2}\,\sqrt {c\,f-d\,e}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x)^2/((e + f*x)^(1/2)*(c + d*x)),x)

[Out]

(2*b^2*(e + f*x)^(3/2))/(3*d*f^2) - (e + f*x)^(1/2)*((4*b^2*e - 4*a*b*f)/(d*f^2) + (2*b^2*(c*f^3 - d*e*f^2))/(
d^2*f^4)) + (2*atan((d^(1/2)*(e + f*x)^(1/2)*(a*d - b*c)^2)/((c*f - d*e)^(1/2)*(a^2*d^2 + b^2*c^2 - 2*a*b*c*d)
))*(a*d - b*c)^2)/(d^(5/2)*(c*f - d*e)^(1/2))

________________________________________________________________________________________

sympy [A]  time = 38.44, size = 110, normalized size = 0.98 \begin {gather*} \frac {2 b^{2} \left (e + f x\right )^{\frac {3}{2}}}{3 d f^{2}} + \frac {2 b \sqrt {e + f x} \left (2 a d f - b c f - b d e\right )}{d^{2} f^{2}} - \frac {2 \left (a d - b c\right )^{2} \operatorname {atan}{\left (\frac {1}{\sqrt {\frac {d}{c f - d e}} \sqrt {e + f x}} \right )}}{d^{2} \sqrt {\frac {d}{c f - d e}} \left (c f - d e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**2/(d*x+c)/(f*x+e)**(1/2),x)

[Out]

2*b**2*(e + f*x)**(3/2)/(3*d*f**2) + 2*b*sqrt(e + f*x)*(2*a*d*f - b*c*f - b*d*e)/(d**2*f**2) - 2*(a*d - b*c)**
2*atan(1/(sqrt(d/(c*f - d*e))*sqrt(e + f*x)))/(d**2*sqrt(d/(c*f - d*e))*(c*f - d*e))

________________________________________________________________________________________